package com.mskj.zxmy.service.serviceImpl;

import com.mskj.zxmy.dto.UnfinishedCountDTO;
import com.mskj.zxmy.mapper.MaterialRequisitionMapper;
import com.mskj.zxmy.mapper.StockInMapper;
import com.mskj.zxmy.service.NoNumberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class NoNumberServiceImpl implements NoNumberService {

    @Autowired
    private StockInMapper stockInMapper;
    @Autowired
    private MaterialRequisitionMapper materialRequisitionMapper;

    public UnfinishedCountDTO getUnfinishedCounts() {
        UnfinishedCountDTO dto = new UnfinishedCountDTO();
        dto.setUnStockedInCount(stockInMapper.countUnStockedIn());
        dto.setUnStockedDetailsInCount(stockInMapper.countUnStockedInDetails());
        dto.setUnPickedCount(materialRequisitionMapper.countUnPicked());
        return dto;
    }
}
